package com.dream.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

/**
 * 用户班级表
 * 
 * 指的是老师，学生，家长，专家，所有哪个年级和班
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "sys_user_class")
public class Sys_User_Class extends AllId implements Serializable
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private SysUser sysUser;

	private Sys_Class sys_Class;

	private String year;//当前在班的年份
	
	private String state="0";//当前在班的状态   1表示当前在值 ，0表示只是现在所属  //-1表示已经不在此学校，离校状态
	
	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade(CascadeType.PERSIST)
	public SysUser getSysUser()
	{
		return sysUser;
	}

	public void setSysUser(SysUser sysUser)
	{
		this.sysUser = sysUser;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade(CascadeType.PERSIST)
	public Sys_Class getSys_Class()
	{
		return sys_Class;
	}

	public void setSys_Class(Sys_Class sys_Class)
	{
		this.sys_Class = sys_Class;
	}
 
	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public String getState()
	{
		return state;
	}

	public void setState(String state)
	{
		this.state = state;
	}

	
}
